﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace Inscriptionem.Extensions
{
    public static class StringListExtensions
    {
        public static string AsString(this List<string> Value)
        {
            return Value.AsString(Environment.NewLine);
        }
        public static string AsString(this List<string> Value, string Splitter)
        {
            StringBuilder builder = new StringBuilder(Value.Count*15);

            for (int i = 0; i < Value.Count; i++)
            {
                builder.Append(Value[i]);
                if (i != (Value.Count - 1))
                {
                    builder.Append(Splitter);
                }
            }

            return builder.ToString();
        }
    }
}